import request from '@/utils/request'
import { encryptionData } from '@/utils/com'
import Qs from 'qs'

/* 获取个人信息 */
export function getList(data) {
  return request({
    url: '/jcdSys/user/info',
    method: 'get',
    headers: encryptionData(data, '/user/info'),
    params: data
  })
}

/* 修改个人信息 */
export function updateList(data) {
  return request({
    url: '/jcdSys/user/update',
    method: 'put',
    headers: encryptionData(data, '/user/update'),
    data: Qs.stringify(data)
  })
}

/* 修改密码 */
export function savePsd(data) {
  return request({
    url: '/jcdSys/user/edit',
    method: 'put',
    headers: encryptionData(data, '/user/edit'),
    data: Qs.stringify(data)
  })
}